package com.xugongzhang.thread;

import java.util.HashMap;

/**
 * @author X
 * @date 2022/11/26 17:38
 * 管理客户端连接到服务器的线程的类
 */
public class ManageClientConnectServerThread {
    
    // key是username
    private static HashMap<String, ClientConnectServerThread> map = new HashMap<>();
    
    // 添加线程
    public static void addClientConnectServerThread(String username, ClientConnectServerThread thread) {
        map.put(username, thread);
    }
    // 拿到线程
    public static ClientConnectServerThread getClientConnectServerThread(String username) {
        return map.get(username);
    }
}
